# @Author: Eric Ito
# @Date: 1/29/2009
# @Name: Project Euler Problem 31

"""
In England the currency is made up of pound, ?, and pence, p, and there are eight coins in general circulation:

1p, 2p, 5p, 10p, 20p, 50p, ?1 (100p) and ?2 (200p).
It is possible to make ?2 in the following way:

1?1 + 1*50p + 2*20p + 1*5p + 1*2p + 3*1p

How many different ways can ?2 be made using any number of coins?

"""

def is200(tpl):
    sum = 0
    for a in tpl:
        sum += a
    return sum == 200

def main():
    WAYS = 0
    for a in range(201):
        if is200((a,)):
            WAYS+=1
            continue
        for b in range(101):
            if a*1 + b*2 > 200:
                continue
            if is200((a,b)):
                WAYS+=1
                continue
            for c in range(41):
                if a*1 + b*2 + c*5 > 200:
                   continue
                if is200((a,b,c)):
                   WAYS+=1
                   continue
                for d in range(21):
                    if a*1 + b*2 + c*5 + d*10 > 200:
                        continue
                    if is200((a,b,c,d)):
                        WAYS+=1
                        continue
                    for e in range(11):
                        if a*1 + b*2 + c*5 + d*10 + e*20 > 200:
                            continue
                        if is200((a,b,c,d,e)):
                            WAYS+=1
                            continue
                        for f in range(5):
                            if a*1 + b*2 + c*5 + d*10 + e*20 + f*50 > 200:
                                continue
                            if is200((a,b,c,d,e,f)):
                                WAYS+=1
                                continue
                            for g in range(3):
                                if a*1 + b*2 + c*5 + d*10 + e*20 + f*50 + g*100 > 200:
                                    continue
                                if is200((a,b,c,d,e,f,g)):
                                    WAYS+=1
                                    continue
                                for h in range(2):
                                    if is200((a*1,b*2,c*5,d*10,e*20,f*50,g*100,h*200)):
                                       print a,b,c,d,e,f,g,h
                                       WAYS += 1
    print WAYS
if __name__ == "__main__":
    main()